package com.example.service2.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @className: UserController
 * @description:
 * @author: yang pan
 */
@RequestMapping
@RestController
public class UserController {


    public static Map<String, String> userMap = new HashMap<>();

    static {
        userMap.put("1", "用户名: 杨攀 电话 12345678910");
    }

    @Value("${user.name}")
    private String username;
    @Value("${user.mobile}")
    private String mobile;


    @RequestMapping("/getUserInfo")
    public String getUserInfo(String userId) {

        return "用户名"+ username+ "电话"+ mobile;
    }
}
